glyph_brush_layout
Text layout for ab_glyph.
- Generic positioning & linebreaking traits.
- Built-in layout logic:
- Mixed font & scale sections in a single layout.
- Horizontal align left/center/right.
- Vertical align top/center/bottom.
- Unicode line breaking.
- Bounded layouts.
use ;
let dejavu = try_from_slice?;
let garamond = try_from_slice?;
// Simple font mapping: FontId(0) -> deja vu sans, FontId(1) -> garamond
let fonts = &;
// Layout "hello glyph_brush_layout" on an unbounded line with the second
// word suitably bigger, greener and serif-ier.
let glyphs = default.calculate_glyphs;
assert_eq!;
let SectionGlyph = &glyphs;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
let SectionGlyph = &glyphs;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;